/*
 * Created: Author: Aléx Carvalho / Date: Feb 9, 2015
 * 
 * Changed: $Author: ac280593@gmail.com $ / $Date: 2015-05-15 00:29:31 +0000 (Fri, 15 May 2015) $
 */
package com.cpm.wrapper;

import com.cpm.aggregate.Attribute;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class Limit implements Attribute<Short> {
    
    @Column(nullable = false)
    private Short limit;

    public Limit() {
    }

    public Limit(Integer limit) {
        this.limit = limit.shortValue();
    }
    
    public Limit(Short limit) {
        this.limit = limit;
    }

    @Override
    public Short getValue() {
        return limit;
    }
}
